<?php

require_once 'common/conn.php';
require_once 'common/common.php';

$data = array();
if (isset($_GET['version']) && isset($_GET['os'])) {
    $version = intval(trim($_GET['version']) * 10);
    $os = trim($_GET['os']);
    $db = new DBC();
    $sql = "SELECT name,url,version FROM t_hibaby_resource_version WHERE version*10 > '" . $version . "' AND name = 'answer' AND os = '" . $os . "';";
    $data = $db->fetchData($sql);
}
echo json_encode($data);
?>